package {
	import flash.ui.Keyboard;
	import flash.events.Event;
	import flash.display.Sprite;

	[SWF (width = 800, height = 600,backgroundColor="0x000000")]
	
	public class LaberintoApp extends Sprite {
		private var currentScreen:Sprite;
		public function LaberintoApp() {
			gotoScreen("main");
		}
		public function gotoScreen(screen:String):void{
			var newScreen:Screen2;
			
			if (screen == "main"){
				newScreen = new ScreenGame();
			}
			if (screen == "end"){
				newScreen = new ScreenEndGame();
			}
			if (screen == "over"){
				newScreen = new ScreenGameOver();
			}
			newScreen.laberintoapp = this;
			if (currentScreen != null) {
				removeChild(currentScreen);
			}
			addChild(newScreen);
			currentScreen = newScreen;
		}
				
	}
}
